package andris.android.mobilarena;

import andris.android.mobilarena.model.ArticleList;
import andris.android.mobilarena.model.NewsList;
import android.app.Application;

public class MobilarenaApplication extends Application {

	private static MobilarenaApplication mInstance;
	private static final int CURRENT_API_VERSION = android.os.Build.VERSION.SDK_INT;

	// testing
	public static final ArticleList articles = new ArticleList();
	public static final NewsList news = new NewsList();
	
	@Override
	public void onCreate() {
		super.onCreate();
		mInstance = this;
	}

	public static MobilarenaApplication getInstance() {
		return mInstance;
	}

//	public DownloadedArticle getArticle(String title) {
//		for (DownloadedArticle d : articles) {
//			if (d.getTitle().equalsIgnoreCase(title))
//				return d;
//		}
//		return null;
//	}

	public static int getCurrentApiVersion() {
		return CURRENT_API_VERSION;
	}

}
